// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Engine/StaticMeshActor.h"
#include "OneLife.generated.h"

/**
 * 
 */
UCLASS()
class GAMEOFLIFE_API AOneLife : public AStaticMeshActor
{
	GENERATED_BODY()

private:
	bool tick;

	int adjacentNum;



	void ChangeLife();

	void ShowBody();

public:

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "AOut360BackActor")
		bool lifeBuffer;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "AOut360BackActor")
		bool isLife;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "AOut360BackActor")
		TArray<AOneLife*> adjacent;

	AOneLife();

	virtual void Tick(float DeltaSeconds);

	UFUNCTION(BlueprintCallable, Category = "AOneLife")
		void Init(bool b);

	void UpDate();

	UFUNCTION(BlueprintCallable, Category = "AOneLife")
		void InitAdjacentAndPoint(FVector point);


	UFUNCTION(BlueprintCallable, Category = "AOneLife")
		void AddOneAdjacent(AOneLife* adjacent_);

	
};
